package com.flyco.modules.sms.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.flyco.common.aspect.annotation.Dict;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.flyco.poi.excel.annotation.Excel;

/**
 * @Description: 优惠券记录
 * @Author: flyco
 * @Date:   2020-01-07
 * @Version: V1.0
 */
@Data
@TableName("sms_coupon_history")
public class SmsCouponHistory implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.AUTO)
	private Long id;
	/**couponId*/
	private Long couponId;
	/**memberId*/
	private Long memberId;
	/**使用该券的门店*/
	@Dict(dictTable ="stm_store_info",dicText = "name",dicCode = "store_id")
	private Long useStoreId;
	/**使用该券的用户*/
	private Long useMemberId;
	/**couponCode*/
    @Excel(name = "优惠券号", width = 15)
	private String couponCode;
	/**领取人昵称*/
	private String memberNickname;
	/**获取类型：0->后台赠送；1->主动获取*/
	@Dict(dicCode = "coupon_get_type")
	private Integer getType;
	/**使用状态：0->未使用；1->已使用；2->已过期*/
	@Dict(dicCode = "coupon_use_status")
	private Integer useStatus;
	/**使用时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private java.util.Date useTime;
	/**订单id*/
	private String orderId;
	/**订单号码*/
	private String orderSn;
	/**可用的开始时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date startTime;
	/**过期时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date endTime;
	/**批次号*/
	private String batchNo;
	/**创建人*/
	private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/**更新人*/
	private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date updateTime;
}
